﻿using System;
using System.Linq;
using System.Collections.Generic;

namespace ElevatorDispatching
{
    public class FloorGroup : GroupBase<Floor>, IFloorGroup
    {
        public Floor this[int id] => Items.FirstOrDefault(x => x.Id == id);

        public FloorGroup(IEnumerable<Floor> floors)
        {
            foreach (var floor in floors)
            {
                Items.Add(floor);
            }
        }
    }
}
